namespace FileTransfer.Client.Upload;

public class ProgressStatus(long chunkCount, long totalContentLength)
{
    public int CurrentChunkIndex { get; set; } = 0;
    public long TotalBytesWritten { get; set; } = 0;
    public long ChunkCount { get; } = chunkCount;
    public long TotalContentLength { get; } = totalContentLength;
    public long WorkingChunkBytesWritten { get; set; } = 0;
    public long WorkingChunkSize { get; set; } = 0;

    public ProgressInfo GetProgressInfo()
    {
        return new ProgressInfo(
            TotalBytesWritten + WorkingChunkBytesWritten,
            TotalContentLength,
            ChunkCount,
            CurrentChunkIndex,
            WorkingChunkBytesWritten,
            WorkingChunkSize
        );
    }
}
